<%-- 
    Document   : locationManage
    Created on : Aug 31, 2011, 8:50:01 PM
    Author     : HIEP
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<script>
    function confirmDelete(){
        return confirm("Are you sure want delete this user?");
    }    
</script>

<!DOCTYPE html>
<div id="content" class="roundedBorders">
    <!-- Title -->
    <div id="title" class="b2">
        <h2>Manage Users</h2>
    </div>
    <!-- Title -->
    <!-- Inner Content -->
    <div id="innerContent">
        <p class="intro">
            List Users!
        </p>
        <!-- ListTable -->
        <table cellspacing="0" class="listTable" id="postList">
            <!-- Thead -->
            <thead>
                <tr>
                    <th class="first"><div></div></th>
            <th><a href="#">Fullname</a></th>
            <th><a href="#">Address</a></th>
            <th><a href="#">Email</a></th>
            <th class="last" colspan="2"><a href="#" title="Date">Action</a></th>
            </tr>
            </thead>
            <!-- /Thead -->
            <!-- Tfoot -->
            <tfoot>
                <tr>
                    <td colspan="7">
                        <div class="inner">
                            <div class="paginate">
                            </div>
                        </div>
                    </td>
                </tr>
            </tfoot>
            <!-- /Tfoot -->
            <!-- Tbody -->
            <tbody>
                <logic:notEmpty name="list">
                    <logic:iterate name="list" id="user">
                        <tr>
                            <td><input type="checkbox" class="checkbox"/></td>
                            <td>
                                ${user.fullname}</td>
                            <td>${user.address}</td>
                            <td>${user.email}</td>
                            <td><html:link action="/UserAction.do?method=editRole&email=${user.email}">Edit</html:link></td>
                            <td class="last">
                                <html:link onclick="return confirmDelete();" action="/UserAction.do?method=delete&id=${user.id}">Delete</html:link>
                            </td>
                        </tr>
                    </logic:iterate>
                </logic:notEmpty>

            </tbody>
            <!-- /Tbody -->
        </table>
        <!-- /ListTable -->
    </div>
    <!-- /Inner Content -->
    <div class="bBottom"><div></div></div>
</div>

